﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace ModelLayer
{
    [DataContract]
    public class Reservation
    {
        public Reservation()
        {
            PartReservations = new List<PartReservation>();
        }

        [DataMember]
        public long Id
        {
            get;
            set;
        }

        [DataMember]
        public DateTime Date
        {
            get;
            set;
        }

        [DataMember]
        public ReservationStatusEnum Status
        {
            get;
            set;
        }

        [DataMember]
        public List<PartReservation> PartReservations
        {
            get;
            set;
        }

        [DataMember]
        public Customer Customer
        {
            get;
            set;
        }

        [DataMember]
        public Route Route { get; set; }
    }

    [DataContract(Name = "ReservationsStatus")]
    public enum ReservationStatusEnum
    {
        [EnumMember]
        Accepted,

        [EnumMember]
        Created,

        [EnumMember]
        Completed
    }
}